#include<iostream>
#include<pthread.h>
#include<unistd.h>
#include<sys/types.h>
void *Hello(void *_args)
{
    while (true)
    {
        std::cout<<"new thread pid:"<<getpid()<<std::endl;
        sleep(1);
    }
    
}
int main()
{
    pthread_t  thread;
    pthread_create(&thread,nullptr,Hello,nullptr);
    while (true)
    {
        std::cout<<"main pid:"<<getpid()<<std::endl;
        sleep(1);
    }
}